A debugger or debugging tool is a computer program that is used to test and debug other programs, often referred to as a “target” program running on a target processor. The code in the target program may be run on an instruction set simulator. Running code in an instruction set simulator allows execution of the code to be halted when specific conditions are encountered. A “crash” occurs when a program cannot normally continue because of a programming bug. For example, a program might have tried to use an instruction not available on a current version of a processor or attempt to access unavailable or protected memory. When a program crashes or reaches a preset condition, the debugger typically shows the location in the original code if it is a source-level debugger or symbolic debugger. If the debugger is a low-level debugger or a machine-language debugger, it may show the line in the disassembly.
Some debuggers offer functions such as running a program step-by-step (“single-stepping”, stopping at some event or specified instruction by means of a breakpoint (“breaking”), and tracking values of variables. Some debuggers have the ability to modify program state while it is running. It may also be possible to continue execution at a different location in the program to bypass a crash or logical error.
In order for a debugger or debugging tool to analyze a target program running on a target processor, the debugger or debugging tool needs to be aware of the tools available to debug the target program and have access to the target processor.